﻿@{
    ViewBag.Title = "关于" + Model.NickName + " - 小博客";
    Layout = "~/Views/Shared/_BlogLayout.cshtml";
}
@model AccountModel
<link href="~/Content/Blog/aboutme.css" rel="stylesheet" />
<div class="main-desc">
    <div class="dv-title-main">
        About Me
    </div>
    <div class="dv-title">
        基本信息<a href="javascript:;" title="收起" onclick="hideBase(this)">—</a>
    </div>
    <div class="aboutme-head">
        @if (Model.HeadId.HasValue && Model.HeadId.Value > 0)
        {
        <img class="imghead100 round" src="@Url.Action("GetUserHeadByUid","account",new { uid = Model.Account })" />
        }
        else
        {
        <img class="imghead100 round" src="~/Content/Images/zanwutouxiang.jpg" />
        }
    </div>
    <div class="dv-desc">
        <p><label>昵称：</label>@Model.NickName</p>
        <p><label>姓名：</label>@Model.UserName</p>
        <p><label>性别：</label>@(Model.Sex.Value ? "男" : "女")</p>
        <p><label>生日：</label>@(Model.Birthday.HasValue ? Model.Birthday.Value.ToString("yyyy-MM-dd") : "")</p>
        <p><label>学历：</label>@Model.Education</p>
        <p><label>专业：</label>@Model.Profession</p>
        @if (!Model.IsAdmin)
        {
            <p><label>Email：</label>@Model.Email</p>
        }
        <p><label>地址：</label>@Model.Native</p>
        <p><label>座右铭：</label>@(!string.IsNullOrWhiteSpace(Model.Motto) ? Model.Motto : "愿有人陪你颠沛流离，如果没有，愿你成为自己的太阳。")</p>
    </div>
    <div class="dv-title">
        关于我
    </div>
    <div class="desc-content">
        @Html.Raw(Model.PersonalProfile)
    </div>
</div>
<script type="text/javascript">
    function hideBase(a) {
        if ($(a).text() == "—") {
            $('.dv-desc').slideUp(500);
            $(a).text('+').attr('title', "展开");
        } else {
            $('.dv-desc').slideDown(500);
            $(a).text('—').attr('title', "收起");
        }
    }
</script>